<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@include file="/include/public.jspf"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-base.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-common.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/p-all.css" />
<script type="text/javascript" src="${path }/js/jquery1.10.2.min.js?v${v}"></script>
<script type="text/javascript" src="${path }/js/helper.js?v=${v}"></script>
<script type="text/javascript" src="${path }/js/cookie.js?v=${v}"></script>
<script type="text/javascript" src="${path }/js/login/login_common.js?v=${v}"></script>
<script type="text/javascript" src="${path }/js/login/login.js?v=${v}"></script>
<title>登录</title>
</head>
<body>
   <div class="p_login_new">
                <div class="ui_title"><a class="ui_back" href="${path }/"><i class="ui_icon_back"></i>返回</a>登录</div>
                <div class="login_banner">
            <img src="${path }/images/login_banner.png" width="100%">
        </div>
        <div class="ui_register gray">
            <div class="tr pt10 f14">没有账号？<a href="${path }/user/register">立即注册</a></div>
                    <div class="form_box clearfix">
                        <div class="border_b"><input id="username" name="username" type="text" class="ui_reg_input" placeholder="手机号" value=""></div>
                        <div class="border_b"><input id="password" name="password" type="password" class="ui_reg_input" placeholder="登录密码"></div>
                                            </div>
                    <div>
                        <input id="login_a" type="button" class="reg_finish_btn" value="登录"> 
                        <p class="tc gray pt10 f14">忘记密码，请登录魔环金融电脑版进行修改</a></p>
                    </div>
            </div>
        </div>
        <script>
        $(function(){
            // 按钮disable状态逻辑
            function upateSubmitButton() {
                var disabled = $('#account').val() == '' || $('#password').val() == '' || ($('#verify').length != 0 && $('#verify').val() == '');
                if (disabled) {
                    $('#login_btn').attr('disabled', 'disabled');
                } else {
                    $('#login_btn').removeAttr('disabled');
                }
            }
            $('#account').bind("input", upateSubmitButton);
            $('#password').bind("input", upateSubmitButton);
            $('#verify').bind("input", upateSubmitButton);
            var _upateSubmitButtonCount = 10;
            var _upateSubmitButtonTimer = setInterval(function(){
                upateSubmitButton();
                _upateSubmitButtonCount--;
                if (_upateSubmitButtonCount < 0) {
                    clearInterval(_upateSubmitButtonTimer);
                }
            }, 300);

            // 图片验证码逻辑
            function updateCaptchaImg() {
                $('.yz_img img').attr('src', '/verify.php?w=40&h=20&rb=0&rand=' + new Date().valueOf());
            }
            $('.yz_img').click(function() {
                updateCaptchaImg();
            });
            updateCaptchaImg();

            // 错误提示 php动态插入
            
            // 禁用微信分享
            function onBridgeReady() {
                WeixinJSBridge.call('hideOptionMenu');
            }

            if (typeof WeixinJSBridge == "undefined") {
                if (document.addEventListener) {
                    document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
                } else if (document.attachEvent) {
                    document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
                    document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
                }
            } else {
                onBridgeReady();
            }
            // 禁用微信分享 end
        });
        </script>
</body>
</html>